package com.neu.questionnaireplus.service;

import com.neu.questionnaireplus.entity.Tenement;
import java.util.List;

public interface TenementService {


  Tenement queryTenementByUsername(String username);

  /**
  * @Description: 查询所有租户,包括已经删除的
  * @Param: []
  * @return: java.util.List<com.neu.questionnaireplus.entity.Tenement>
  * @Author: ~FHX~ (:TSunS:)
  * @Date: 2022/10/30
  */
  List<Tenement> queryTenement();
  
  /** 
  * @Description: 查询未被删除的租户 
  * @Param: [] 
  * @return: java.util.List<com.neu.questionnaireplus.entity.Tenement> 
  * @Author: ~FHX~ (:TSunS:)
  * @Date: 2022/10/31 
  */ 
  List<Tenement> queryExistTenement();

  /**
  * @Description: 模糊查询租户
  * @Param: [tenement]
  * @return: java.util.List<com.neu.questionnaireplus.entity.Tenement>
  * @Author: ~FHX~ (:TSunS:)
  * @Date: 2022/10/30
  */
  List<Tenement> selectTenementList(Tenement tenement);

  /**
  * @Description: 根据id查询租户并返回
  * @Param: [id]
  * @return: com.neu.questionnaireplus.entity.Tenement
  * @Author: ~FHX~ (:TSunS:)
  * @Date: 2022/10/30
  */
  Tenement queryTenementByID(String id);

  /**
  * @Description: 插入一个Tenement进数据库
  * @Param: [tenement]
  * @return: boolean
  * @Author: ~FHX~ (:TSunS:)
  * @Date: 2022/10/30
  */
  boolean insertTenement(Tenement tenement);

  /**
  * @Description: 根据id更新租户
  * @Param: [tenement]
  * @return: boolean
  * @Author: ~FHX~ (:TSunS:)
  * @Date: 2022/10/30
  */
  boolean updateTenement(Tenement tenement);

  /**
  * @Description: 根据id删除租户
  * @Param: [id]
  * @return: boolean
  * @Author: ~FHX~ (:TSunS:)
  * @Date: 2022/10/30
  */
  boolean deleteTenement(String id);

  /**
  * @Description: 根据电话查询租户对象
  * @Param: [telnumber]
  * @return: com.neu.questionnaireplus.entity.Tenement
  * @Author: ~FHX~ (:TSunS:)
  * @Date: 2022/10/30
  */
  Tenement queryTenementByPhone( String telnumber);

  /**
  * @Description: 通过密码登录
  * @Param: [username, password]
  * @return: boolean
  * @Author: ~FHX~ (:TSunS:)
  * @Date: 2022/10/30
  */
  boolean loginByPassword( String username, String password);

  /**
  * @Description: 通过用户名和回答验证密保
  * @Param: [username, answer]
  * @return: boolean
  * @Author: ~FHX~ (:TSunS:)
  * @Date: 2022/10/30
  */
  boolean checkSecurityQuestion( String username, String answer);

  /** 
  * @Description: 查询是否有数据关联
  * @Param: [id] 
  * @return: boolean 
  * @Author: ~FHX~ (:TSunS:)
  * @Date: 2022/10/30 
  */ 
  boolean hasDataRelation( String id);

  /** 
  * @Description: 通过租户的username模糊查询租户
   * @Param: [username] 
  * @return: java.util.List<com.neu.questionnaireplus.entity.Tenement> 
  * @Author: ~FHX~ (:TSunS:)
  * @Date: 2022/10/30 
  */  
  List<Tenement> queryTenementByName( String username);
  
  /** 
  * @Description: 根据id禁用租户 
  * @Param: [id] 
  * @return: boolean 
  * @Author: ~FHX~ (:TSunS:)
  * @Date: 2022/10/30 
  */ 
  boolean forbiddenTenement( String id);
  
  /** 
  * @Description: 根据id解禁租户
  * @Param: [id] 
  * @return: boolean 
  * @Author: ~FHX~ (:TSunS:)
  * @Date: 2022/10/30 
  */ 
  boolean freeTenement( String id);

  /**
  * @Description: 根据租户群组状态做为依据修改租户信息
  * @Param: [tenement]
  * @return: boolean
  * @Author: ~FHX~ (:TSunS:)
  * @Date: 2022/10/31
  */
  boolean modifyTenementInfo(Tenement tenement);

  /** 
  * @Description:  根据租户群组状态做为依据逻辑删除租户信息
  * @Param: [tenement] 
  * @return: boolean 
  * @Author: ~FHX~ (:TSunS:)
  * @Date: 2022/10/31 
  */ 
  boolean deleteTenementInfo(Tenement tenement);

  /**
  * @Description: 通过用户输入的inputStr验证码和真实验证码realStr进行比较，同时查询手机号是否存在，若存在且验证正确，登录放行
  * @Param: [phone, inputStr, realStr]
  * @return: boolean
  * @Author: ~FHX~ (:TSunS:)
  * @Date: 2022/11/2
  */
  boolean loginByPhone(String phone,String inputStr,String realStr);

 /**
 * @Description: 验证注册租户的验证码
 * @Param: [phone, inputStr, realStr]
 * @return: boolean
 * @Author: ~FHX~ (:TSunS:)
 * @Date: 2022/11/2
 */
  boolean checkRegisterStr(String phone,String inputStr,String realStr);

  /**
  * @Description: 验证重置密码的手机验证码
   * @Param: [phone, inputStr, realStr]
  * @return: boolean
  * @Author: ~FHX~ (:TSunS:)
  * @Date: 2022/11/2
  */
  boolean checkResetPwdStr(String phone,String inputStr,String realStr);

}
